A hypervisor is a software interface between the physical hardware of a computing device, such as a wireless telephone or vehicle user interface system, and multiple operating systems. Each operating system managed by the hypervisor is associated with a different virtual machine, and each operating system appears to have exclusive access to the underlying hardware, such as processors, user interface devices, and memory. However, the hardware is a shared resource, and the hypervisor controls all hardware access (e.g., via prioritized time sharing).
In order to give each virtual machine the appearance of exclusive access to one or more physical processors, the hypervisor schedules one or more virtual processors to execute on one or more physical processors based on a priority associated with each virtual processor. In one example, if two virtual processors are sharing one physical processor, where one of the virtual processors has a priority level that is twice as high as the other virtual processor; the hypervisor may schedule the higher priority virtual processor to execute on the physical processor twice as often as the lower priority virtual processor. In another example, if one virtual processor has a higher priority than another virtual processor, and both virtual processors are available to run, then the hypervisor may schedule the virtual processor with the higher priority to execute on the physical processor every time. This strict-priority based scheduling supports real-time processing.
However, each virtual processor may be executing a plurality of different threads. Some of these threads may be more time critical than others. As a result, threads within a virtual processor only execute when the virtual processor is scheduled, and their thread-priorities are not considered. This may lead to scheduling low priority threads on a high priority virtual processor in preference to high priority threads on a medium priority virtual processor.